<?php

use yii\helpers\Html;
use yii\helpers\Url;

$mark = $model->getAttributeLabel('seq') . '：<span class="label label-info">' . $model->seq . '</span>&nbsp;';
$mark .= $model->getAttributeLabel('name') . '：<span class="label label-info">' . $model->name . '</span>&nbsp;';
$mark .= $model->getAttributeLabel('screenid') . '：<span class="label label-info">' . $model->screenid . '</span>&nbsp;';
$project = isset($project) ? $project : $model->cip->project;
$random = isset($project->random) ? $project->random == \common\models\Project::PROJECT_RANDOM_ONE : false;
$mark .= ($random ? '受试者入组号' : '受试者随机号') . '：<span class="label label-info">' . $model->subjid . '</span>&nbsp;';
$mark .= $model->getAttributeLabel('status') . '：<span class="label label-info">' . $model->statuses[$model->status] . '</span>&nbsp;';
if (!isset($tags)) {
    $this->params['breadcrumbs'][] = ['label' => Yii::t('subject', 'Subjects List'), 'url' => ['subject/index']];
} else {
    if ($tags == 3) {
        $this->params['breadcrumbs'][] = ['label' => 'SDV——受试者列表', 'url' => ['sdv/summary']];
    } elseif ($tags == 4) {
        $this->params['breadcrumbs'][] = ['label' => '质控——受试者列表', 'url' => ['/qa/qa/summary']];
    } elseif ($tags == 2) {
        $this->params['breadcrumbs'][] = ['label' => '脱敏SD', 'url' => ['sdv/subject-index']];
    } else {
        $this->params['breadcrumbs'][] = ['label' => Yii::t('subject', 'Subjects List'), 'url' => ['subject/index']];
    }
}
if (!isset($tags)) {
    $this->params['breadcrumbs'][] = ['label' => Yii::t('subject', 'Subject Overview'), 'url' => ['subject/view', 'id' => $model->seq]];
} else {
    if ($tags == 3) {
        $this->params['breadcrumbs'][] = ['label' => 'SDV概况', 'url' => ['sdv/view', 'id' => $model->seq, 'tag' => $tag, 'tags' => $tags]];
    } elseif ($tags == 4) {
        $this->params['breadcrumbs'][] = ['label' => 'QA概况', 'url' => ['/qa/qa/view', 'id' => $model->seq, 'tag' => $tag, 'tags' => $tags]];
    } else {
        $this->params['breadcrumbs'][] = ['label' => Yii::t('subject', 'Subject Overview'), 'url' => ['subject/view', 'id' => $model->seq, 'tag' => $tag, 'tags' => $tags]];
    }
}
$this->params['breadcrumbs'][] = $mark;
?>